from multiprocessing.reduction import duplicate
import os
import sys
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if project_root not in sys.path:
    sys.path.append(project_root)
    
from readlater.feishu_sync.feishu_sync_manager import FeishuSyncManager
from readlater.utils.logger import get_logger


# 启动服务
if __name__ == "__main__":
    logger = get_logger(__name__)
    logger.info("启动服务")

    # 初始化数据库
    feishu_sync_manager = FeishuSyncManager()
    success, failed, duplicate = feishu_sync_manager.sync()
    logger.info(f"同步完成 - 成功: {len(success)}, 失败: {len(failed)}, 重复: {len(duplicate)}")

    logger.info("服务完成")
   




